class c:
    def __init__(self):
        self.a = 1
    def geta (self) : return self.a
    def seta (self,val) : self.a = val
        
class d:
    def __init__(self,getter,setter):
        self.getter = getter
        self.setter = setter
    def update (self):
        self.setter (self.getter()+1)


c0=c()
d0=d(c0.geta,c0.seta)
d0.update()
print c0.a

